﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VK.Casemeet.Groups
{
    public enum Enum_GroupIsSignup { 未参加团购=0,已参加过团购=1}

    public  class GroupsBLL
    {
        public static int AddGroups(GroupsEntity group)
        {
            return GroupsDAL.AddGroups(group);
        }

        public static List<GroupsEntity> GetGroups(string condtions, int shopid, int categorid=0)
        {
            return GroupsDAL.GetGroups(condtions, shopid, categorid);
        }

        public static GroupsEntity GetGroups(int groupid)
        {
            return GroupsDAL.GetGroups(groupid);
        }

        public static int GroupCount(int categorid, int shopid, int AreaID=0)
        { return GroupsDAL.GroupCount(categorid, shopid, AreaID); }

        public static List<GroupsEntity> GetGroups(int startRecordIndex, int endRecordIndex, int categorid,int shopid,int AreaID=0)
        { return GroupsDAL.GetGroups(startRecordIndex, endRecordIndex, categorid, shopid, AreaID); }
        
        public static int DelGroup(int groupid)
        {
            return GroupsDAL.DelGroup(groupid);
        }

        public static int UpdateGroup(GroupsEntity group)
        { return GroupsDAL.UpdateGroup(group); }


        #region --团购分类

        public static int AddGroupCategory(CategoryEntity categoryEntity)
        {
           return  CategoryDAL.InsertCategory(categoryEntity);
        }

        public static List<CategoryEntity> GetCategories(int gcid,string condition)
        {
            return CategoryDAL.GetCategories(gcid, condition);
        }

        public static int DelGetCategory(int gcid)
        {
            return CategoryDAL.DelCategoryEntity(gcid);
        }

        public static int SetCategoryMoveUp(int gcid)
        { return CategoryDAL.SetCategoryMoveUp(gcid); }

        public static int SetCategoryMoveDown(int gcid)
        { return CategoryDAL.SetCategoryMoveDown(gcid); }

        public static int UpdateCategory(CategoryEntity categoryEntity)
        {
            return CategoryDAL.UpdateCategory(categoryEntity); 
        }
        #endregion
    }
}
